import pygame, sys
from pygame.locals import *
from source import *
from source.Constant import *

from source.states.state import StateManager
from source.states.Menus import MainMenu

pygame.init()

windowSurface = pygame.display.set_mode(RESOLUTION, 0, 32)
pygame.display.set_caption(CAPTION)

clock = pygame.time.Clock()

StateManager.add(MainMenu())

while True:
    clock.tick(FPS)
    StateManager.Update()
    StateManager.Input()

    windowSurface.fill((0, 0, 0))
    StateManager.Draw(windowSurface)
    pygame.display.update()